---
title: Viewing Pods and Nodes
weight: 10
---

<!DOCTYPE html>

<html lang="en">

<body>

<link href="/docs/tutorials/kubernetes-basics/public/css/styles.css" rel="stylesheet">


<div class="layout" id="top">

    <main class="content">

        <div class="row">

     <div class="col-md-8">
          <h3>Objectives</h3>
                <ul>
                    <li>Learn about Kubernetes Pods.</li>
                    <li>Learn about Kubernetes Nodes.</li>
                    <li>Troubleshoot deployed applications.</li>
                </ul>
            </div>

            <div class="col-md-8">
                <h2>Kubernetes Pods</h2>
                <p>When you created a Deployment in Module <a href="/docs/tutorials/kubernetes-basics/deploy-intro/">2</a>, Kubernetes created a <b>Pod</b> to host your application instance. A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers. Those resources include:</p>
                <ul>
                    <li>Shared storage, as Volumes</li>
                    <li>Networking, as a unique cluster IP address</li>
                    <li>Information about how to run each container, such as the container image version or specific ports to use</li>
                </ul>
                <p>A Pod models an application-specific "logical host" and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p>

            <p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p>

            </div>
            <div class="col-md-4">
                <div class="content__box content__box_lined">
                    <h3>Summary:</h3>
                    <ul>
                        <li>Pods</li>
                        <li>Nodes</li>
                        <li>Kubectl main commands</li>
                    </ul>
                </div>
                <div class="content__box content__box_fill">
                        <p><i>
                            A Pod is a group of one or more application containers (such as Docker or rkt) and includes shared storage (volumes), IP address and information about how to run them.
                        </i></p>
                </div>
            </div>
        </div>
        <br>

        <div class="row">
            <div class="col-md-8">
                <h2 style="color: #3771e3;">Pods overview</h2>
            </div>
        </div>

        <div class="row">
            <div class="col-md-8">
                <p><img src="/docs/tutorials/kubernetes-basics/public/images/module_03_pods.svg"></p>
            </div>
        </div>
        <br>

        <div class="row">
            <div class="col-md-8">
                <h2>Nodes</h2>
                <p>A Pod always runs on a <b>Node</b>. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master. A Node can have multiple pods, and the Kubernetes master automatically handles scheduling the pods across the Nodes in the cluster. The Master's automatic scheduling takes into account the available resources on each Node.</p>

                <p>Every Kubernetes Node runs at least:</p>
                <ul>
                    <li>Kubelet, a process responsible for communication between the Kubernetes Master and the Node; it manages the Pods and the containers running on a machine.</li>
                    <li>A container runtime (like Docker, rkt) responsible for pulling the container image from a registry, unpacking the container, and running the application.</li>
                </ul>

            </div>
            <div class="col-md-4">
                <div class="content__box content__box_fill">
                    <p><i> Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk. </i></p>
                </div>
            </div>
        </div>

        <br>

        <div class="row">
            <div class="col-md-8">
                <h2 style="color: #3771e3;">Node overview</h2>
            </div>
        </div>

        <div class="row">
            <div class="col-md-8">
                <p><img src="/docs/tutorials/kubernetes-basics/public/images/module_03_nodes.svg"></p>
            </div>
        </div>
        <br>

        <div class="row">
            <div class="col-md-8">
                <h2>Troubleshooting with kubectl</h2>
                <p>In Module <a href="/docs/tutorials/kubernetes-basics/deploy-intro/">2</a>, you used Kubectl command-line interface. You'll continue to use it in Module 3 to get information about deployed applications and their environments. The most common operations can be done with the following kubectl commands:</p>
                <ul>
                    <li><b>kubectl get</b> - list resources</li>
                    <li><b>kubectl describe</b> - show detailed information about a resource</li>
                    <li><b>kubectl logs</b> - print the logs from a container in a pod</li>
                    <li><b>kubectl exec</b> - execute a command on a container in a pod</li>
                </ul>

                <p>You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are.</p>

                <p>Now that we know more about our cluster components and the command line, let's explore our application.</p>

            </div>
            <div class="col-md-4">
                <div class="content__box content__box_fill">
                    <p><i> A node is a worker machine in Kubernetes and may be a VM or physical machine, depending on the cluster. Multiple Pods can run on one Node. </i></p>
                </div>
            </div>
        </div>
        <br>

        <div class="row">
            <div class="col-md-12">
                <a class="btn btn-lg btn-success" href="/docs/tutorials/kubernetes-basics/explore-interactive/" role="button">Start Interactive Tutorial <span class="btn__next">›</span></a>
            </div>
        </div>

    </main>

</div>

</body>
</html>
